﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace BTServer
{
    public partial class NewDevice : Form
    {
        private String deviceName;
        private String deviceCode;

        public String DeviceName
        {
            get
            {
                return deviceName;
            }

            set
            {
                deviceName = value;
            }
        }

        public String DeviceCode
        {
            get
            {
                return deviceCode;
            }

            set
            {
                deviceCode = value;
            }
        }
        public NewDevice()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (txtName.Text != "" && txtCode.Text != "")
            {
                deviceName = txtName.Text;
                deviceCode = txtCode.Text;
            }
            else
            {
                MessageBox.Show("Greska", "Popunite sva polja", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
    }
}
